home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4071 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news.Stanford.EDU!not-for-mail
  2. From: brien@leland.Stanford.EDU (brien oberstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Copy constructing an already default constructed object
  5. Date: 27 Jan 1996 10:33:13 -0800
  6. Organization: Stanford University
  7. Message-ID: <4edr59$87h@elaine11.Stanford.EDU>
  8. References: <4e906b$stk@elaine32.Stanford.EDU> <4eal0n$hgq@dawn.mmm.com> <3108ef14.340699@nntp> <4ebehj$5i7@news.bridge.net>
  9. NNTP-Posting-Host: elaine11.stanford.edu
  10. X-Newsreader: NN version 6.5.0 (NOV)
  11.  
  12. David Byrden <100101.2547@compuserve.com> writes:
  13.  
  14.  
  15. >>>  A::operator =(const A& other)
  16. >>>  {
  17. >>>    b0 = other.b0 ;
  18. >>>    b1 = other.b1;
  19. >>>  }
  20.  
  21. >>> To me this seems like a major pain in the butt.
  22.  
  23. >That's precisely why the compiler will automatically generate a public 
  24. >assignment operator with this behaviour, if you don't bother to write 
  25. >one.
  26.  
  27. Bzz.  Try again king shit.  The compiler generates memberwise assignment.
  28.  
  29.  
  30. >>>  Do you have to overload = for all the contained operators too?
  31.  
  32. >>>  All I really want to do is have the copy constructor invoked on the 
  33. >>> piece that piece of memory.  Why can't this be done?
  34.  
  35. >Brien, I genuinely cannot understand what you are trying to say in these 
  36. >two sentences. Sloppy English, like C++, can be a "major pain the the 
  37. >butt".
  38.  
  39. Dave, I hereby BAN you from reading this thread any further.  This is for
  40. your own good.  Dave, you are forbidden from reading my articles anymore.
  41. Its obviously too stressful for a guy like you.  Genuinely understand that.
  42.  
  43. -brien
  44.  
  45. PS If I ask for the toilet paper then you can roll out.
  46.  
  47.  
  48.